# -*- ecoding: utf-8 -*-
# @Author: Wick
# @Time: 2024-02-24 22:44

class A:
    def __init__(self):
        self.num1 = 100
        self.__num2 = 200

    def demo(self):
        print(self.__num2)

class B(A):
    def __init__(self):
        self.num3 = 300  # 增加属性num3，并且继承父亲的属性
        super().__init__()
    def demo(self):
        print(self.num1)

a = A()
a.demo()
print("-"*50)
b = B()
b.demo()
print(b.num1)